3.1.3 \(\int x (d+c d x) (a+b \tanh ^{-1}(c x)) \, dx\) [3]

Optimal. Leaf size=84 \[ \frac {b d x}{2 c}+\frac {1}{6} b d x^2+\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {5 b d \log (1-c x)}{12 c^2}-\frac {b d \log (1+c x)}{12 c^2} \]

[Out]

1/2*b*d*x/c+1/6*b*d*x^2+1/2*d*x^2*(a+b*arctanh(c*x))+1/3*c*d*x^3*(a+b*arctanh(c*x))+5/12*b*d*ln(-c*x+1)/c^2-1/
12*b*d*ln(c*x+1)/c^2

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {45, 6083, 12, 815, 647, 31} \begin {gather*} \frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {5 b d \log (1-c x)}{12 c^2}-\frac {b d \log (c x+1)}{12 c^2}+\frac {b d x}{2 c}+\frac {1}{6} b d x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(d + c*d*x)*(a + b*ArcTanh[c*x]),x]

[Out]

(b*d*x)/(2*c) + (b*d*x^2)/6 + (d*x^2*(a + b*ArcTanh[c*x]))/2 + (c*d*x^3*(a + b*ArcTanh[c*x]))/3 + (5*b*d*Log[1
 - c*x])/(12*c^2) - (b*d*Log[1 + c*x])/(12*c^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 815

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x)^m*((f + g*x)/(a + c*x^2)), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 6083

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u =
IntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTanh[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 - c^2*
x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q,
 0]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rubi steps

\begin {align*} \int x (d+c d x) \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )-(b c) \int \frac {d x^2 (3+2 c x)}{6-6 c^2 x^2} \, dx\\ &=\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )-(b c d) \int \frac {x^2 (3+2 c x)}{6-6 c^2 x^2} \, dx\\ &=\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )-(b c d) \int \left (-\frac {1}{2 c^2}-\frac {x}{3 c}+\frac {3+2 c x}{c^2 \left (6-6 c^2 x^2\right )}\right ) \, dx\\ &=\frac {b d x}{2 c}+\frac {1}{6} b d x^2+\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )-\frac {(b d) \int \frac {3+2 c x}{6-6 c^2 x^2} \, dx}{c}\\ &=\frac {b d x}{2 c}+\frac {1}{6} b d x^2+\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{2} (b d) \int \frac {1}{-6 c-6 c^2 x} \, dx-\frac {1}{2} (5 b d) \int \frac {1}{6 c-6 c^2 x} \, dx\\ &=\frac {b d x}{2 c}+\frac {1}{6} b d x^2+\frac {1}{2} d x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{3} c d x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {5 b d \log (1-c x)}{12 c^2}-\frac {b d \log (1+c x)}{12 c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 79, normalized size = 0.94 \begin {gather*} \frac {d \left (6 b c x+6 a c^2 x^2+2 b c^2 x^2+4 a c^3 x^3+2 b c^2 x^2 (3+2 c x) \tanh ^{-1}(c x)+5 b \log (1-c x)-b \log (1+c x)\right )}{12 c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(d + c*d*x)*(a + b*ArcTanh[c*x]),x]

[Out]

(d*(6*b*c*x + 6*a*c^2*x^2 + 2*b*c^2*x^2 + 4*a*c^3*x^3 + 2*b*c^2*x^2*(3 + 2*c*x)*ArcTanh[c*x] + 5*b*Log[1 - c*x
] - b*Log[1 + c*x]))/(12*c^2)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 90, normalized size = 1.07

method result size
derivativedivides \(\frac {d a \left (\frac {1}{3} x^{3} c^{3}+\frac {1}{2} c^{2} x^{2}\right )+\frac {d b \arctanh \left (c x \right ) c^{3} x^{3}}{3}+\frac {d b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+\frac {d b \,c^{2} x^{2}}{6}+\frac {d b c x}{2}+\frac {5 d b \ln \left (c x -1\right )}{12}-\frac {d b \ln \left (c x +1\right )}{12}}{c^{2}}\) \(90\)
default \(\frac {d a \left (\frac {1}{3} x^{3} c^{3}+\frac {1}{2} c^{2} x^{2}\right )+\frac {d b \arctanh \left (c x \right ) c^{3} x^{3}}{3}+\frac {d b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+\frac {d b \,c^{2} x^{2}}{6}+\frac {d b c x}{2}+\frac {5 d b \ln \left (c x -1\right )}{12}-\frac {d b \ln \left (c x +1\right )}{12}}{c^{2}}\) \(90\)
risch \(\frac {d b \,x^{2} \left (2 c x +3\right ) \ln \left (c x +1\right )}{12}-\frac {d c \,x^{3} b \ln \left (-c x +1\right )}{6}+\frac {d c \,x^{3} a}{3}-\frac {d b \,x^{2} \ln \left (-c x +1\right )}{4}+\frac {d a \,x^{2}}{2}+\frac {b d \,x^{2}}{6}+\frac {b d x}{2 c}-\frac {b d \ln \left (c x +1\right )}{12 c^{2}}+\frac {5 b d \ln \left (-c x +1\right )}{12 c^{2}}\) \(107\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(c*d*x+d)*(a+b*arctanh(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c^2*(d*a*(1/3*x^3*c^3+1/2*c^2*x^2)+1/3*d*b*arctanh(c*x)*c^3*x^3+1/2*d*b*arctanh(c*x)*c^2*x^2+1/6*d*b*c^2*x^2
+1/2*d*b*c*x+5/12*d*b*ln(c*x-1)-1/12*d*b*ln(c*x+1))

________________________________________________________________________________________

Maxima [A]
time = 0.25, size = 99, normalized size = 1.18 \begin {gather*} \frac {1}{3} \, a c d x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {x^{2}}{c^{2}} + \frac {\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b c d + \frac {1}{2} \, a d x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b d \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)*(a+b*arctanh(c*x)),x, algorithm="maxima")

[Out]

1/3*a*c*d*x^3 + 1/6*(2*x^3*arctanh(c*x) + c*(x^2/c^2 + log(c^2*x^2 - 1)/c^4))*b*c*d + 1/2*a*d*x^2 + 1/4*(2*x^2
*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3))*b*d

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 93, normalized size = 1.11 \begin {gather*} \frac {4 \, a c^{3} d x^{3} + 2 \, {\left (3 \, a + b\right )} c^{2} d x^{2} + 6 \, b c d x - b d \log \left (c x + 1\right ) + 5 \, b d \log \left (c x - 1\right ) + {\left (2 \, b c^{3} d x^{3} + 3 \, b c^{2} d x^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{12 \, c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)*(a+b*arctanh(c*x)),x, algorithm="fricas")

[Out]

1/12*(4*a*c^3*d*x^3 + 2*(3*a + b)*c^2*d*x^2 + 6*b*c*d*x - b*d*log(c*x + 1) + 5*b*d*log(c*x - 1) + (2*b*c^3*d*x
^3 + 3*b*c^2*d*x^2)*log(-(c*x + 1)/(c*x - 1)))/c^2

________________________________________________________________________________________

Sympy [A]
time = 0.29, size = 100, normalized size = 1.19 \begin {gather*} \begin {cases} \frac {a c d x^{3}}{3} + \frac {a d x^{2}}{2} + \frac {b c d x^{3} \operatorname {atanh}{\left (c x \right )}}{3} + \frac {b d x^{2} \operatorname {atanh}{\left (c x \right )}}{2} + \frac {b d x^{2}}{6} + \frac {b d x}{2 c} + \frac {b d \log {\left (x - \frac {1}{c} \right )}}{3 c^{2}} - \frac {b d \operatorname {atanh}{\left (c x \right )}}{6 c^{2}} & \text {for}\: c \neq 0 \\\frac {a d x^{2}}{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)*(a+b*atanh(c*x)),x)

[Out]

Piecewise((a*c*d*x**3/3 + a*d*x**2/2 + b*c*d*x**3*atanh(c*x)/3 + b*d*x**2*atanh(c*x)/2 + b*d*x**2/6 + b*d*x/(2
*c) + b*d*log(x - 1/c)/(3*c**2) - b*d*atanh(c*x)/(6*c**2), Ne(c, 0)), (a*d*x**2/2, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 305 vs. \(2 (72) = 144\).
time = 0.43, size = 305, normalized size = 3.63 \begin {gather*} \frac {1}{3} \, c {\left (\frac {{\left (\frac {6 \, {\left (c x + 1\right )}^{2} b d}{{\left (c x - 1\right )}^{2}} - \frac {3 \, {\left (c x + 1\right )} b d}{c x - 1} + b d\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{3} c^{3}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{3}}{c x - 1} - c^{3}} + \frac {\frac {12 \, {\left (c x + 1\right )}^{2} a d}{{\left (c x - 1\right )}^{2}} - \frac {6 \, {\left (c x + 1\right )} a d}{c x - 1} + 2 \, a d + \frac {5 \, {\left (c x + 1\right )}^{2} b d}{{\left (c x - 1\right )}^{2}} - \frac {8 \, {\left (c x + 1\right )} b d}{c x - 1} + 3 \, b d}{\frac {{\left (c x + 1\right )}^{3} c^{3}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{3}}{c x - 1} - c^{3}} - \frac {b d \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{3}} + \frac {b d \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{3}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)*(a+b*arctanh(c*x)),x, algorithm="giac")

[Out]

1/3*c*((6*(c*x + 1)^2*b*d/(c*x - 1)^2 - 3*(c*x + 1)*b*d/(c*x - 1) + b*d)*log(-(c*x + 1)/(c*x - 1))/((c*x + 1)^
3*c^3/(c*x - 1)^3 - 3*(c*x + 1)^2*c^3/(c*x - 1)^2 + 3*(c*x + 1)*c^3/(c*x - 1) - c^3) + (12*(c*x + 1)^2*a*d/(c*
x - 1)^2 - 6*(c*x + 1)*a*d/(c*x - 1) + 2*a*d + 5*(c*x + 1)^2*b*d/(c*x - 1)^2 - 8*(c*x + 1)*b*d/(c*x - 1) + 3*b
*d)/((c*x + 1)^3*c^3/(c*x - 1)^3 - 3*(c*x + 1)^2*c^3/(c*x - 1)^2 + 3*(c*x + 1)*c^3/(c*x - 1) - c^3) - b*d*log(
-(c*x + 1)/(c*x - 1) + 1)/c^3 + b*d*log(-(c*x + 1)/(c*x - 1))/c^3)

________________________________________________________________________________________

Mupad [B]
time = 0.90, size = 83, normalized size = 0.99 \begin {gather*} \frac {d\,\left (3\,a\,x^2+b\,x^2+3\,b\,x^2\,\mathrm {atanh}\left (c\,x\right )\right )}{6}-\frac {\frac {d\,\left (3\,b\,\mathrm {atanh}\left (c\,x\right )-b\,\ln \left (c^2\,x^2-1\right )\right )}{6}-\frac {b\,c\,d\,x}{2}}{c^2}+\frac {c\,d\,\left (2\,a\,x^3+2\,b\,x^3\,\mathrm {atanh}\left (c\,x\right )\right )}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*atanh(c*x))*(d + c*d*x),x)

[Out]

(d*(3*a*x^2 + b*x^2 + 3*b*x^2*atanh(c*x)))/6 - ((d*(3*b*atanh(c*x) - b*log(c^2*x^2 - 1)))/6 - (b*c*d*x)/2)/c^2
 + (c*d*(2*a*x^3 + 2*b*x^3*atanh(c*x)))/6

________________________________________________________________________________________